﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteTemplate.Master" AutoEventWireup="true" CodeBehind="Search1.aspx.cs" Inherits="carportal.Search1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:bestgifts4usConnectionString %>" 
                    SelectCommand="SELECT [vehicletype], [id] FROM [carportal_vehicletypes]">
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlDataSourceCounties" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:bestgifts4usConnectionString %>" 
                    
                    SelectCommand="SELECT [id], [countrycode], [countryname] FROM [carportal_countries]">
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlDataSourceMakes" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:bestgifts4usConnectionString %>" 
                    SelectCommand="SELECT [id], [make_name] FROM [carportal_make]">
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlDataSourceModel" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:bestgifts4usConnectionString %>" 
                    
        SelectCommand="SELECT id, model, make_id FROM carportal_model WHERE (make_id = @makeid)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownListMakes" Name="makeid" 
                            PropertyName="SelectedValue" />
                    </SelectParameters>
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlDataSourceSearch_result" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:bestgifts4usConnectionString %>" 
                    SelectCommand="SELECT carportal_cars.id, carportal_cars.user_id, carportal_cars.make, carportal_cars.model, carportal_cars.model_by_user, carportal_cars.car_type, carportal_cars.engine_power, carportal_cars.first_reg_date, carportal_cars.millage_km, carportal_cars.fuel_type, carportal_cars.gearbox, carportal_cars.price, carportal_cars.country_code, carportal_cars.location_city, carportal_cars.climate_control, carportal_cars.seat_count, carportal_cars.color, carportal_cars.door_count, carportal_cars.Auxiliary_heating, carportal_cars.Central_locking, carportal_cars.Cruise_control, carportal_cars.Electric_heated, carportal_cars.Electric_windows, carportal_cars.Leather_seats, carportal_cars.Parking_sensors, carportal_cars.Power_Steering, carportal_cars.Sunroof, carportal_cars.Four_wheel_drive, carportal_cars.Immobilizer, carportal_cars.Xenon_headlights, carportal_cars.ABS, carportal_cars.ESP, carportal_cars.user_comments, carportal_make.id AS Expr1, carportal_make.make_name, carportal_model.id AS Expr2, carportal_model.make_id, carportal_countries.id AS Expr4, carportal_countries.countrycode, carportal_countries.countryname, carportal_vehicletypes.id AS Expr5, carportal_vehicletypes.vehicletype, carportal_search_cars.id AS Expr6, carportal_search_cars.searched_user, carportal_search_cars.make AS Expr7, carportal_search_cars.model AS Expr8, carportal_search_cars.model_by_user AS Expr9, carportal_search_cars.car_type AS Expr10, carportal_search_cars.engine_power AS Expr11, carportal_search_cars.first_reg_date AS Expr12, carportal_search_cars.millage_km AS Expr13, carportal_search_cars.fuel_type AS Expr14, carportal_search_cars.gearbox AS Expr15, carportal_search_cars.price_from, carportal_search_cars.price_to, carportal_search_cars.country_code AS Expr16, carportal_search_cars.location_city AS Expr17, carportal_search_cars.climate_control AS Expr18, carportal_search_cars.seat_count AS Expr19, carportal_search_cars.color AS Expr20, carportal_search_cars.door_count AS Expr21, carportal_search_cars.Auxiliary_heating AS Expr22, carportal_search_cars.Central_locking AS Expr23, carportal_search_cars.Cruise_control AS Expr24, carportal_search_cars.Electric_heated AS Expr25, carportal_search_cars.Electric_windows AS Expr26, carportal_search_cars.Leather_seats AS Expr27, carportal_search_cars.Parking_sensors AS Expr28, carportal_search_cars.Power_Steering AS Expr29, carportal_search_cars.Sunroof AS Expr30, carportal_search_cars.Four_wheel_drive AS Expr31, carportal_search_cars.Immobilizer AS Expr32, carportal_search_cars.Xenon_headlights AS Expr33, carportal_search_cars.ABS AS Expr34, carportal_search_cars.ESP AS Expr35, carportal_search_cars.user_comments AS Expr36, carportal_search_cars.first_reg_year_from, carportal_search_cars.first_reg_year_to, carportal_model.model AS modelname,carportal_make.make_name as makename FROM carportal_cars left outer join  carportal_make ON carportal_cars.make = carportal_make.id left outer join  carportal_model ON carportal_cars.model = carportal_model.id left outer join  carportal_countries ON carportal_cars.country_code = carportal_countries.id left outer join  carportal_vehicletypes ON carportal_cars.car_type = carportal_vehicletypes.id left outer join  carportal_search_cars ON 1 = 1 AND (carportal_cars.make = carportal_search_cars.make OR carportal_search_cars.make = - 1) AND (carportal_cars.model = carportal_search_cars.model OR carportal_search_cars.model = - 1) AND (carportal_cars.car_type = carportal_search_cars.car_type OR carportal_search_cars.car_type = - 1) AND (carportal_cars.gearbox = carportal_search_cars.gearbox OR carportal_search_cars.gearbox = '-1') AND carportal_cars.price BETWEEN carportal_search_cars.price_from AND carportal_search_cars.price_to AND carportal_cars.first_reg_date BETWEEN carportal_search_cars.first_reg_year_from AND carportal_search_cars.first_reg_year_to ">
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlDataSourceLatestCars" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:bestgifts4usConnectionString %>" 
                    SelectCommand="SELECT carportal_cars.id, carportal_cars.user_id, carportal_cars.make, carportal_cars.model, carportal_cars.model_by_user, carportal_cars.car_type, carportal_cars.engine_power, carportal_cars.first_reg_date, carportal_cars.millage_km, carportal_cars.fuel_type, carportal_cars.gearbox, carportal_cars.price, carportal_cars.country_code, carportal_cars.location_city, carportal_cars.climate_control, carportal_cars.seat_count, carportal_cars.color, carportal_cars.door_count, carportal_cars.Auxiliary_heating, carportal_cars.Central_locking, carportal_cars.Cruise_control, carportal_cars.Electric_heated, carportal_cars.Electric_windows, carportal_cars.Leather_seats, carportal_cars.Parking_sensors, carportal_cars.Power_Steering, carportal_cars.Sunroof, carportal_cars.Four_wheel_drive, carportal_cars.Immobilizer, carportal_cars.Xenon_headlights, carportal_cars.ABS, carportal_cars.ESP, carportal_cars.user_comments, carportal_make.id AS Expr1, carportal_make.make_name, carportal_model.id AS Expr2, carportal_model.make_id, carportal_countries.id AS Expr4, carportal_countries.countrycode, carportal_countries.countryname, carportal_vehicletypes.id AS Expr5, carportal_vehicletypes.vehicletype, carportal_search_cars.id AS Expr6, carportal_search_cars.searched_user, carportal_search_cars.make AS Expr7, carportal_search_cars.model AS Expr8, carportal_search_cars.model_by_user AS Expr9, carportal_search_cars.car_type AS Expr10, carportal_search_cars.engine_power AS Expr11, carportal_search_cars.first_reg_date AS Expr12, carportal_search_cars.millage_km AS Expr13, carportal_search_cars.fuel_type AS Expr14, carportal_search_cars.gearbox AS Expr15, carportal_search_cars.price_from, carportal_search_cars.price_to, carportal_search_cars.country_code AS Expr16, carportal_search_cars.location_city AS Expr17, carportal_search_cars.climate_control AS Expr18, carportal_search_cars.seat_count AS Expr19, carportal_search_cars.color AS Expr20, carportal_search_cars.door_count AS Expr21, carportal_search_cars.Auxiliary_heating AS Expr22, carportal_search_cars.Central_locking AS Expr23, carportal_search_cars.Cruise_control AS Expr24, carportal_search_cars.Electric_heated AS Expr25, carportal_search_cars.Electric_windows AS Expr26, carportal_search_cars.Leather_seats AS Expr27, carportal_search_cars.Parking_sensors AS Expr28, carportal_search_cars.Power_Steering AS Expr29, carportal_search_cars.Sunroof AS Expr30, carportal_search_cars.Four_wheel_drive AS Expr31, carportal_search_cars.Immobilizer AS Expr32, carportal_search_cars.Xenon_headlights AS Expr33, carportal_search_cars.ABS AS Expr34, carportal_search_cars.ESP AS Expr35, carportal_search_cars.user_comments AS Expr36, carportal_search_cars.first_reg_year_from, carportal_search_cars.first_reg_year_to, carportal_model.model AS modelname,carportal_make.make_name as makename FROM carportal_cars INNER JOIN carportal_make ON carportal_cars.make = carportal_make.id INNER JOIN carportal_model ON carportal_cars.model = carportal_model.id INNER JOIN carportal_countries ON carportal_cars.country_code = carportal_countries.id INNER JOIN carportal_vehicletypes ON carportal_cars.car_type = carportal_vehicletypes.id INNER JOIN carportal_search_cars ON 1 = 1 AND (carportal_cars.make = carportal_search_cars.make OR carportal_search_cars.make = - 1) AND (carportal_cars.model = carportal_search_cars.model OR carportal_search_cars.model = - 1) AND (carportal_cars.car_type = carportal_search_cars.car_type OR carportal_search_cars.car_type = - 1) AND (carportal_cars.gearbox = carportal_search_cars.gearbox OR carportal_search_cars.gearbox = '-1') AND carportal_cars.price BETWEEN carportal_search_cars.price_from AND carportal_search_cars.price_to AND carportal_cars.first_reg_date BETWEEN carportal_search_cars.first_reg_year_from AND carportal_search_cars.first_reg_year_to  ">
                </asp:SqlDataSource>
               
           

                	<%--<div class="grid_3">
                        	<div class="box-1 box-indent">
                            	<h3 class="dark">Car Reviews</h3>
                                <div class="box-1-container">
                                	<ul class="list-1 p2">
                                    	<li><span><time datetime="2012-01-01">12.25.2012</time></span><a href="#">Lorem ipsum dolor sit amet conse ctetur adipisicing</a></li>
                                        <li class="sec"><span><time datetime="2012-01-01">12.25.2012</time></span><a href="#">Dolor sit amet conse ctetur </a></li>
                                        <li class="last"><span><time datetime="2012-01-01">12.25.2012</time></span><a href="#">Iipsum dolor sit amet conse ctetur adipisicing</a></li>
                                    </ul>
                                    <a href="#" class="link-1 color-3">More &nbsp;Reviews</a>
                                </div>
                            </div>
                            <div class="box-2">
                            	<h3 class="light">Latest News</h3>
                                <div class="box-2-container">
                                	<ul class="list-1-1 p2">
                                    	<li><span><time datetime="2012-01-01">12.25.2012</time></span><a href="#">Sit amet conse ctetur adipisic- ing lorem</a></li>
                                        <li><span><time datetime="2012-01-01">12.25.2012</time></span><a href="#">Dolor sit amet conse ctetur</a></li>
                                        <li><span><time datetime="2012-01-01">12.25.2012</time></span><a href="#">Lorem ipsum dolor sit amet conse ctetur adipisicing</a></li>
                                    </ul>	
                                    <a href="#" class="link-1 color-4">More &nbsp;News</a>
                                </div>
                            </div>
                        </div>--%>
             
                      	 
                
                      
                                   <asp:SqlDataSource ID="SqlDataSourcecar" runat="server" 
        ConnectionString="<%$ ConnectionStrings:bestgifts4usConnectionString %>" 
        SelectCommand="SELECT carportal_cars.user_id, carportal_cars.make, carportal_cars.model, carportal_cars.model_by_user, carportal_cars.car_type, carportal_cars.engine_power, carportal_cars.first_reg_date, carportal_cars.millage_km, carportal_cars.fuel_type, carportal_cars.gearbox, carportal_cars.price, carportal_cars.country_code, carportal_cars.location_city, carportal_cars.climate_control, carportal_cars.seat_count, carportal_cars.color, carportal_cars.door_count, carportal_cars.Auxiliary_heating, carportal_cars.Central_locking, carportal_cars.Cruise_control, carportal_cars.Electric_heated, carportal_cars.Electric_windows, carportal_cars.Leather_seats, carportal_cars.Parking_sensors, carportal_cars.Power_Steering, carportal_cars.Sunroof, carportal_cars.Four_wheel_drive, carportal_cars.Immobilizer, carportal_cars.Xenon_headlights, carportal_cars.ABS, carportal_cars.ESP, carportal_cars.user_comments, carportal_cars.id, carportal_make.make_name, carportal_vehicletypes.vehicletype, carportal_model.model AS model_name, carportal_countries.countryname FROM carportal_cars INNER JOIN carportal_make ON carportal_cars.make = carportal_make.id INNER JOIN carportal_model ON carportal_cars.model = carportal_model.id INNER JOIN carportal_countries ON carportal_cars.country_code = carportal_countries.id INNER JOIN carportal_vehicletypes ON carportal_cars.car_type = carportal_vehicletypes.id WHERE (carportal_cars.id = @carid)">
        <SelectParameters>
            <asp:QueryStringParameter Name="carid" QueryStringField="carid" />
        </SelectParameters>
    </asp:SqlDataSource>
 <div>
    <div style="text-align:right;">
     <asp:HyperLink runat="server" NavigateUrl="~/Search.aspx"><h4>Back to the list</h4></asp:HyperLink>                                 
    </div>
    <asp:FormView ID="FormView1" runat="server" BackColor="LightGoldenrodYellow" 
        BorderColor="Tan" BorderWidth="1px" CellPadding="2" DataKeyNames="id" 
        DataSourceID="SqlDataSourcecar" ForeColor="Black">
        <FooterStyle BackColor="Tan" />
        <HeaderStyle BackColor="Tan" Font-Bold="True" />
       
        <ItemTemplate>
            <br />
            <table>
                <tr>
                    <td style="width: 400px">
                        <asp:Image ID="Image1" runat="server" 
                            ImageUrl='<%# "UploadImages/"+ Eval("id")+   "_001.jpg" %>' 
                            style="max-width: 378px;" />
                    </td>
                    <td style="width: 400px">
                        engine_power:
                        <asp:Label ID="engine_powerLabel" runat="server" 
                            Text='<%# Bind("engine_power") %>' />
                        <br />
                        first_reg_date:
                        <asp:Label ID="first_reg_dateLabel" runat="server" 
                            Text='<%# Bind("first_reg_date") %>' />
                        <br />
                        millage_km:
                        <asp:Label ID="millage_kmLabel" runat="server" 
                            Text='<%# Bind("millage_km") %>' />
                        <br />
                        fuel_type:
                        <asp:Label ID="fuel_typeLabel" runat="server" Text='<%# Bind("fuel_type") %>' />
                        <br />
                        gearbox:
                        <asp:Label ID="gearboxLabel" runat="server" Text='<%# Bind("gearbox") %>' />
                        <br />
                        price:
                        <asp:Label ID="priceLabel" runat="server" Text='<%# Bind("price") %>' />
                        <br />
                        user_comments:
                        <asp:Label ID="user_commentsLabel0" runat="server" 
                            Text='<%# Bind("user_comments") %>' />
                        <br />
                        id:
                        <asp:Label ID="idLabel0" runat="server" Text='<%# Eval("id") %>' />
                        <br />
                        make_name:
                        <asp:Label ID="make_nameLabel0" runat="server" 
                            Text='<%# Bind("make_name") %>' />
                        <br />
                        vehicletype:
                        <asp:Label ID="vehicletypeLabel0" runat="server" 
                            Text='<%# Bind("vehicletype") %>' />
                        <br />
                        model_name:
                        <asp:Label ID="model_nameLabel0" runat="server" 
                            Text='<%# Bind("model_name") %>' />
                        <br />
                        countryname:
                        <asp:Label ID="countrynameLabel0" runat="server" 
                            Text='<%# Bind("countryname") %>' />
                        <br />
                        model_by_user:
                        <asp:Label ID="model_by_userLabel" runat="server" 
                            Text='<%# Bind("model_by_user") %>' />
                        <br />
                        location_city:
                        <asp:Label ID="location_cityLabel0" runat="server" 
                            Text='<%# Bind("location_city") %>' />
                        <br />
                        climate_control:
                        <asp:Label ID="climate_controlLabel0" runat="server" 
                            Text='<%# Bind("climate_control") %>' />
                        <br />
                        seat_count:
                        <asp:Label ID="seat_countLabel0" runat="server" 
                            Text='<%# Bind("seat_count") %>' />
                        <br />
                        color:
                        <asp:Label ID="colorLabel0" runat="server" Text='<%# Bind("color") %>' />
                        <br />
                        door_count:
                        <asp:Label ID="door_countLabel0" runat="server" 
                            Text='<%# Bind("door_count") %>' />
                    </td>
                </tr>
            </table>
            <table style="width: 100%">
                <tr>
                    <td>
                       <asp:Image ID="Image2" runat="server" 
                            ImageUrl='<%# "UploadImages/"+ Eval("id")+   "_002.jpg" %>' 
                            style="max-width: 100px;" />                  
                        <asp:Image ID="Image3" runat="server" 
                            ImageUrl='<%# "UploadImages/"+ Eval("id")+   "_003.jpg" %>' 
                            style="max-width: 100px;" />                    
                       <asp:Image ID="Image4" runat="server" 
                            ImageUrl='<%# "UploadImages/"+ Eval("id")+   "_004.jpg" %>' 
                            style="max-width: 100px;" /> 
                       <asp:Image ID="Image5" runat="server" 
                            ImageUrl='<%# "UploadImages/"+ Eval("id")+   "_005.jpg" %>' 
                            style="max-width: 100px;" /></td>
                </tr>
            </table>
            <br />
            <br />
            <table style="width: 100%">
                <tr>
                    <td style="width: 126px">
                        &nbsp;</td>
                    <td style="width: 126px">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="width: 126px">
                       <table><tr>
						<td style="width: 126px">
                        Auxiliary_heating:</td><td>
                        <asp:CheckBox ID="Auxiliary_heatingCheckBox" runat="server" 
                            Checked='<%# Bind("Auxiliary_heating") %>' Enabled="false" />
                        </td></tr><tr><td>
                        Central_locking:</td><td>
                        <asp:CheckBox ID="Central_lockingCheckBox" runat="server" 
                            Checked='<%# Bind("Central_locking") %>' Enabled="false" />
                       </td><td>
                       </td></tr><tr><td> Cruise_control:</td><td>
                        <asp:CheckBox ID="Cruise_controlCheckBox" runat="server" 
                            Checked='<%# Bind("Cruise_control") %>' Enabled="false" />
                       
                        </td></tr><tr><td>Electric_heated:</td><td>
                        <asp:CheckBox ID="Electric_heatedCheckBox" runat="server" 
                            Checked='<%# Bind("Electric_heated") %>' Enabled="false" />
                        
                        </td></tr><tr><td>Electric_windows:</td><td>
                        <asp:CheckBox ID="Electric_windowsCheckBox" runat="server" 
                            Checked='<%# Bind("Electric_windows") %>' Enabled="false" />
                      
                        </td></tr><tr><td>Leather_seats:</td><td>
                        <asp:CheckBox ID="Leather_seatsCheckBox" runat="server" 
                            Checked='<%# Bind("Leather_seats") %>' Enabled="false" />
                        </td></tr><tr><td>Parking_sensors:</td><td>
                        <asp:CheckBox ID="Parking_sensorsCheckBox" runat="server" 
                            Checked='<%# Bind("Parking_sensors") %>' Enabled="false" />

                       </td>
                    </tr></table>
                    </td>
                    <td>&nbsp;</td>
                    <td>
                       <table><tr>
						<td style="width: 126px"> 
                       
                        Power_Steering:</td><td>
                        <asp:CheckBox ID="Power_SteeringCheckBox" runat="server" 
                            Checked='<%# Bind("Power_Steering") %>' Enabled="false" />
						</td></tr><tr><td>
                        Sunroof:</td><td>
                        <asp:CheckBox ID="SunroofCheckBox" runat="server" 
                            Checked='<%# Bind("Sunroof") %>' Enabled="false" />
                        </td></tr><tr><td>
                        Four_wheel_drive:</td><td>
                        <asp:CheckBox ID="Four_wheel_driveCheckBox" runat="server" 
                            Checked='<%# Bind("Four_wheel_drive") %>' Enabled="false" />
                        </td></tr><tr><td>
                        Immobilizer:</td><td>
                        <asp:CheckBox ID="ImmobilizerCheckBox" runat="server"  CssClass="checkbox1"
                            Checked='<%# Bind("Immobilizer") %>'  />
                        </td></tr><tr><td>
                        Xenon_headlights:</td><td>
                        <asp:CheckBox ID="Xenon_headlightsCheckBox" runat="server" 
                            Checked='<%# Bind("Xenon_headlights") %>' Enabled="false" />
                        </td></tr><tr><td>
                        ABS:</td><td>
                        <asp:CheckBox ID="ABSCheckBox" runat="server" Checked='<%# Bind("ABS") %>' 
                            Enabled="false" />
                        </td></tr><tr><td>
                        ESP:</td><td>
                        <asp:CheckBox ID="ESPCheckBox" runat="server" Checked='<%# Bind("ESP") %>' 
                            Enabled="false" />
                       </td>
</tr></table>
                    </td>
                     
                </tr>
            </table>
            <br />
            &nbsp;<br />

        </ItemTemplate>
        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
            HorizontalAlign="Center" />
    </asp:FormView> 
                                     
                            </div>
                        </div>
                    <div class="clear"></div>
                </div>
            </header>
            
            <!--==============================content================================-->
            <section id="content">
                <div class="container_12">
              
                </div>
            </section>
</asp:Content>
